home *** CD-ROM | disk | FTP | other *** search
- // ==================================================
- // TouchMeAppleEvents.r
- // Copyright (C) 1996 Mizutori Tetsuya, July 4 1996.
- // ==================================================
- // All documents are pretty-printed in Geneva 10-point font.
-
- #define SystemSevenOrLater TRUE
-
- #include <Types.r>
- #include <SysTypes.r>
- #include <AEObjects.r>
- #include <AERegistry.r>
- #include <AEUserTermTypes.r>
- #include <AppleEvents.r>
- #include <ASRegistry.r>
-
- #include <PowerPlant.r>
-
- #include <AEPowerPlantSuite.h>
- #include <AETextSuite.h>
- #include <AEDebugSuite.h>
-
- // Macros for some common patterns...
- // (the files below assume the presence of these macros)
- #define Reserved4_ reserved, reserved, reserved, reserved
- #define Reserved8_ Reserved4_, Reserved4_
- #define Reserved12_ Reserved8_, Reserved4_
- #define ReservedVerb_ Reserved8_, verbEvent, reserved, reserved, reserved
- #define ReservedPrep_ Reserved8_, reserved, prepositionParam, notFeminine, notMasculine, singular
- #define ReservedApost_ Reserved8_, noApostrophe, notFeminine, notMasculine, singular
-
-
- // TouchMe AppleEvent Terminology
-
- #define ae_GetPrefs 10001 // 'getp'
- #define ae_SetPrefs 10002 // 'setp'
- #define ae_LoadPrefs 10003 // 'lodp'
- #define ae_SavePrefs 10004 // 'savp'
- #define ae_Touch 10005 // 'toch'
- #define ae_Fetch 10006 // 'ftch'
-
-
- #define kAETouchMeSuite 'MzTm'
- #define kAEGetPrefs 'getp'
- #define kAESetPrefs 'setp'
- #define kAELoadPrefs 'lodp'
- #define kAESavePrefs 'savp'
- #define kAETouch 'toch'
- #define kAEFetch 'ftch'
-
- #define cTouchMePref 'pref'
- #define pPref_Enabled 'penb'
- #define pPref_Flag 'pflg'
- #define pPref_Value 'pval'
-
- #define cTouchMeStamp 'stmp'
- #define pStamp_Creation 'crtd'
- #define pStamp_Modification 'modd'
-
- #define typeAETouchMeType 'Etyp'
- #define kEnumType_Creation 'crtT'
- #define kEnumType_Modification 'modT'
-
- #define typeAETouchMeFlag 'Eflg'
- #define kEnumFlag_Current 'curr'
- #define kEnumFlag_Excact 'dval'
- #define kEnumFlag_First 'frst'
- #define kEnumFlag_FirstSet 'scnd'
-
-
- // --------------------------------------------------
- // ・ Apple Event Dispatching Table
- // --------------------------------------------------
-
- resource 'aedt' (1000, "touchMe Suite") {
- { /* array: 6 elements */
- /* [1] */
- kAETouchMeSuite, kAEGetPrefs, ae_GetPrefs,
- /* [2] */
- kAETouchMeSuite, kAESetPrefs, ae_SetPrefs,
- /* [3] */
- kAETouchMeSuite, kAELoadPrefs, ae_LoadPrefs,
- /* [4] */
- kAETouchMeSuite, kAESavePrefs, ae_SavePrefs,
- /* [5] */
- kAETouchMeSuite, kAETouch, ae_Touch,
- /* [6] */
- kAETouchMeSuite, kAEFetch, ae_Fetch
- }
- };
-
-
- // --------------------------------------------------
- // ・ Apple Event Terminology Extension
- // --------------------------------------------------
-
- resource 'aete' (0, "English") {
- 0x01, // major version in BCD
- 0x10, // minor version in BCD
- english, // language code
- roman, // script code
- { /* array Suites: 2 elements */
- /* [1] */
- "Required Suite", // suite name
- "Terms that every application should support", // suite description
- kAERequiredSuite, // suite ID
- 1, // suite level
- 1, // suite version
- {}, /* array Events: 0 elements */
- {}, /* array Classes: 0 elements */
- {}, /* array ComparisonOps: 0 elements */
- {}, /* array Enumerations: 0 elements */
-
- /* [2] */
- "touchMe Suite", // suite name
- "Change creation & modification date time for the file",
- kAETouchMeSuite,
- 1,
- 1,
- { /* array Events: 6 elements */
- /* [1] */
- "get prefs", // event name
- "Get the settings information", // event description
- kAETouchMeSuite, // event class
- kAEGetPrefs, // event ID
- cTouchMePref, // reply type
- "list of current settings", // reply description
- replyRequired, // if the reply is required
- listOfItems, // if the reply must be a list
- notEnumerated, // if the type is enumerated
- notTightBindingFunction, // if the message has tight binding precedence
- ReservedVerb_, // these 12 bits are reserved
- typeAETouchMeType, // direct param type
- "creation or modification type", // direct param description
- directParamRequired, // if the direct param is required
- singleItem, // if the param must be a list
- enumerated, // if the type is enumerated
- doesntChangeState, // if the event changes server's state
- Reserved12_, // these 12 bits are reserved
- {}, /* array OtherParams: 0 elements */
-
- /* [2] */
- "set prefs", // event name
- "Set the settings information",
- kAETouchMeSuite,
- kAESetPrefs,
- noReply,
- "",
- replyOptional,
- singleItem,
- notEnumerated,
- notTightBindingFunction,
- ReservedVerb_,
- typeAETouchMeType,
- "creation or modification type",
- directParamRequired,
- singleItem,
- enumerated,
- changesState,
- Reserved12_,
- { /* array OtherParams: 1 elements */
- /* [1] */
- "to", // parameter name
- keyAEData, // parameter keyword
- typeWildCard, // parameter type
- "list of new settings", // parameter description
- required, // if param is optional
- singleItem, // if the param must be a list
- notEnumerated, // if the type is enumerated
- ReservedPrep_ // these 13 bits are reserved
- },
-
- /* [3] */
- "load prefs", // event name
- "Load the settings from preferences file",
- kAETouchMeSuite,
- kAELoadPrefs,
- noReply,
- "",
- replyOptional,
- singleItem,
- notEnumerated,
- notTightBindingFunction,
- ReservedVerb_,
- noParams,
- "",
- directParamOptional,
- singleItem,
- notEnumerated,
- doesntChangeState,
- Reserved12_,
- {}, /* array OtherParams: 0 elements */
-
- /* [4] */
- "save prefs", // event name
- "Save the settings to preferences file",
- kAETouchMeSuite,
- kAESavePrefs,
- noReply,
- "",
- replyOptional,
- singleItem,
- notEnumerated,
- notTightBindingFunction,
- ReservedVerb_,
- noParams,
- "",
- directParamOptional,
- singleItem,
- notEnumerated,
- doesntChangeState,
- Reserved12_,
- {}, /* array OtherParams: 0 elements */
-
- /* [5] */
- "touch", // event name
- "Touch the files",
- kAETouchMeSuite,
- kAETouch,
- noReply,
- "",
- replyOptional,
- singleItem,
- notEnumerated,
- notTightBindingFunction,
- ReservedVerb_,
- typeAlias,
- "list of objects to touch",
- directParamRequired,
- listOfItems,
- notEnumerated,
- changesState,
- Reserved12_,
- {}, /* array OtherParams: 0 elements */
-
- /* [6] */
- "fetch", // event name
- "Fetch the date time stamp of file, and set the fields",
- kAETouchMeSuite,
- kAEFetch,
- cTouchMeStamp,
- "creation and modification date time",
- replyRequired,
- listOfItems,
- notEnumerated,
- notTightBindingFunction,
- ReservedVerb_,
- typeAlias,
- "list of objects to fetch",
- directParamRequired,
- listOfItems,
- notEnumerated,
- changesState,
- Reserved12_,
- {} /* array OtherParams: 0 elements */
-
- },
-
- { /* array Classes: 2 elements */
- /* [1] */
- "prefs", // class name
- cTouchMePref, // class ID
- "Settings information", // class description
- { /* array Properties: 3 elements */
- /* [1] */
- "enabled", // property name
- pPref_Enabled, // property ID
- typeBoolean, // property class
- "", // property description
- reserved,
- singleItem, // if the property must be a list
- notEnumerated, // if the type is enumerated
- readWrite, // can read or write it
- ReservedApost_, // these 12 bits are reserved
-
- /* [2] */
- "flag", // property name
- pPref_Flag,
- typeAETouchMeFlag,
- "",
- reserved,
- singleItem,
- enumerated,
- readWrite,
- ReservedApost_,
-
- /* [3] */
- "value", // property name
- pPref_Value,
- typeLongDateTime,
- "",
- reserved,
- singleItem,
- notEnumerated,
- readWrite,
- ReservedApost_
- },
- {}, /* array Elements: 0 elements */
-
- /* [2] */
- "time stamp", // class name
- cTouchMeStamp,
- "Creation and Modification date time",
- { /* array Properties: 2 elements */
- /* [1] */
- "creation date", // property name
- pStamp_Creation,
- typeLongDateTime,
- "creation date",
- reserved,
- singleItem,
- notEnumerated,
- readWrite,
- ReservedApost_,
-
- /* [2] */
- "modification date", // property name
- pStamp_Modification,
- typeLongDateTime,
- "modification date",
- reserved,
- singleItem,
- notEnumerated,
- readWrite,
- ReservedApost_
- },
- {}, /* array Elements: 0 elements */
-
- },
-
- {}, /* array ComparisonOps: 0 elements */
-
- { /* array Enumerations: 2 elements */
- /* [1] */
- typeAETouchMeType, // Enumeration ID
- { /* array Enumerators: 2 elements */
- /* [1] */
- "creation", // Enumerator name
- kEnumType_Creation, // Enumerator ID
- "creation type", // Enumerator comment
-
- /* [2] */
- "modification", // Enumerator name
- kEnumType_Modification,
- "modification type"
- },
-
- /* [2] */ // Enumeration ID
- typeAETouchMeFlag,
- { /* array Enumerators: 4 elements */
- /* [1] */
- "current", // Enumerator name
- kEnumFlag_Current,
- "by current date time",
-
- /* [2] */
- "exact", // Enumerator name
- kEnumFlag_Excact,
- "by exact date time",
-
- /* [3] */
- "firstone", // Enumerator name
- kEnumFlag_First,
- "by first item",
-
- /* [4] */
- "firstset", // Enumerator name
- kEnumFlag_FirstSet,
- "by first item and set"
- }
- }
- }
- };
-
- // end of resources
-